package com.bigpillar.storageservice.service.impl;

import com.bigpillar.storageservice.mapper.StorageMapper;
import com.bigpillar.storageservice.service.StorageService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class StorageServiceImpl  implements StorageService {
    @Resource
    private StorageMapper storageMapper;

    /**
     * 减库存
     * @param productId
     * @param count
     * @return
     */
    @Override
    public void decrease(Long productId, Integer count) {
        storageMapper.decrease(productId, count);
    }
}
